package hcn.protocol.brandnew.zhenliao.jiancha;

import lombok.Data;
import javax.xml.bind.annotation.*;
import java.util.List;
import hcn.protocol.brandnew.BaseRequest;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;


/**
 * 检查报告列表查询-响应消息(成功) - ODS_03070012_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class GetReportListResponse {

    /**
     * 总条数
     */
    @XmlElement(name = "Total")
    private Long total;
    /**
     * 报告列表
     */
    @XmlElementWrapper(name = "Reports")
    @XmlElement(name = "Report")
    private List<Report> reports;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Image {

        /**
         * 图像编号
         */
        @XmlElement(name = "ImageNo")
        private String imageNo;
        /**
         * 图像说明
         */
        @XmlElement(name = "ImageNotes")
        private String imageNotes;
        /**
         * 显示顺序
         */
        @XmlElement(name = "DisplayOrder")
        private String displayOrder;
        /**
         * 图像格式
         */
        @XmlElement(name = "ImageFormat")
        private String imageFormat;
        /**
         * 图像规格
         */
        @XmlElement(name = "ImageSize")
        private String imageSize;
        /**
         * 数据存储方式
         */
        @XmlElement(name = "DataStorageMode")
        private String dataStorageMode;
        /**
         * 图像文件存储路径
         */
        @XmlElement(name = "ImageLocalURL")
        private String imageLocalURL;
        /**
         * 图像内容
         */
        @XmlElement(name = "ImageData")
        private String imageData;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Report {

        /**
         * 业务系统患者档案ID
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;
        /**
         * 身份证件号码
         */
        @XmlElement(name = "IdCard")
        private String idCard;
        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 就诊流水号
         */
        @XmlElement(name = "VisitId")
        private String visitId;
        /**
         * 患者类型代码
         */
        @XmlElement(name = "PatientType")
        private String patientType;
        /**
         * 门（急）诊号
         */
        @XmlElement(name = "ClinicId")
        private String clinicId;
        /**
         * 住院号
         */
        @XmlElement(name = "HospizationId")
        private String hospizationId;
        /**
         * 检查类别代码
         */
        @XmlElement(name = "ExamTypeCode")
        private String examTypeCode;
        /**
         * 检查类别名称
         */
        @XmlElement(name = "ExamTypeName")
        private String examTypeName;
        /**
         * 年龄（岁）
         */
        @XmlElement(name = "Age")
        private String age;
        /**
         * 检查申请单编号
         */
        @XmlElement(name = "RequestId")
        private String requestId;
        /**
         * 报告机构名称
         */
        @XmlElement(name = "ReportOrganizationName")
        private String reportOrganizationName;
        /**
         * 检查报告机构
         */
        @XmlElement(name = "ReportOrganization")
        private String reportOrganization;
        /**
         * 报告单编号
         */
        @XmlElement(name = "ReportId")
        private String reportId;
        /**
         * 检查报告科室
         */
        @XmlElement(name = "ReportDept")
        private String reportDept;
        /**
         * 检查方法名称
         */
        @XmlElement(name = "ExamMethodName")
        private String examMethodName;
        /**
         * 影像号
         */
        @XmlElement(name = "StudyId")
        private String studyId;
        /**
         * 放射DICOM影像webview的URL
         */
        @XmlElement(name = "WebPACSURL")
        private String webPACSURL;
        /**
         * 检查项目代码
         */
        @XmlElement(name = "ExamItemCode")
        private String examItemCode;
        /**
         * 检查项目名称集
         */
        @XmlElement(name = "ExamItemName")
        private String examItemName;
        /**
         * 检查部位代码
         */
        @XmlElement(name = "ExamPartCode")
        private String examPartCode;
        /**
         * 检查部位名称
         */
        @XmlElement(name = "ExamPartName")
        private String examPartName;
        /**
         * 检查描述
         */
        @XmlElement(name = "ExamDescript")
        private String examDescript;
        /**
         * 检查结论
         */
        @XmlElement(name = "ExamDiagnosis")
        private String examDiagnosis;
        /**
         * 医生建议
         */
        @XmlElement(name = "Suggestion")
        private String suggestion;
        /**
         * 检查技师签名
         */
        @XmlElement(name = "Technician")
        private String technician;
        /**
         * 检查技师代码
         */
        @XmlElement(name = "ExecuteDoctorCode")
        private String executeDoctorCode;
        /**
         * 检查技师姓名
         */
        @XmlElement(name = "ExecuteDoctor")
        private String executeDoctor;
        /**
         * 检查时间
         */
        @XmlElement(name = "ExecuteDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date executeDateTime;
        /**
         * 报告医生代码
         */
        @XmlElement(name = "ReportDoctorCode")
        private String reportDoctorCode;
        /**
         * 报告医生姓名
         */
        @XmlElement(name = "ReportDoctor")
        private String reportDoctor;
        /**
         * 报告时间
         */
        @XmlElement(name = "ReportDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date reportDateTime;
        /**
         * 审核医生代码
         */
        @XmlElement(name = "ReviewDoctorCode")
        private String reviewDoctorCode;
        /**
         * 审核医生姓名
         */
        @XmlElement(name = "ReviewDoctor")
        private String reviewDoctor;
        /**
         * 审核时间
         */
        @XmlElement(name = "ReviewDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date reviewDateTime;
        /**
         * 检查报告备注
         */
        @XmlElement(name = "ReportMark")
        private String reportMark;
        /**
         * 报告打印标志代码
         */
        @XmlElement(name = "ReportPrintFlag")
        private String reportPrintFlag;
        /**
         * 检查设备名称
         */
        @XmlElement(name = "ExaminationDevice")
        private String examinationDevice;
        /**
         * 图文报告文件格式
         */
        @XmlElement(name = "FileType")
        private String fileType;
        /**
         * 图文报告文件地址
         */
        @XmlElement(name = "FileName")
        private String fileName;
        /**
         * 阴阳性
         */
        @XmlElement(name = "Malignant")
        private Byte malignant;
        /**
         * 图像信息
         */
        @XmlElementWrapper(name = "Images")
        @XmlElement(name = "Image")
        private List<Image> images;

        @XmlElement(name = "PresentedFormDTO")
        private PresentedFormDTO presentedFormDTO;

        /**
         * 申请医生姓名
         */
        @XmlElement(name = "RequestDocName")
        private String requestDocName;

        @XmlElement(name = "RequestDoctor")
        private String requestDoctor;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class PresentedFormDTO {

        @XmlElement(name = "ContentType")
        private String contentType;

        @XmlElement(name = "Data")
        private String data;

    }

}
